/**
 * MyProgressBar 自定义进度条，适配 ios android
 * @author TianGui (2696765101@qq.com)
 */
import React, { Component } from 'react';
//import { ProgressViewIOS, ProgressBarAndroid, Platform } from 'react-native';
import { Platform } from 'react-native';

var MyProgressBar1;

// 或许应该换 require() 试试
// if (Platform.OS === 'ios') {
//     import { ProgressViewIOS } from 'react-native';
//     MyProgressBar1 = ProgressViewIOS;
// } else {
//     import { ProgressBarAndroid } from 'react-native';
//     MyProgressBar1 = ProgressBarAndroid;
// }

console.log('AAA', 'MyProgressBar1', MyProgressBar1);

export default class MyProgressBar extends React.Component {

    render() {
        if (Platform.OS === 'ios')
            return <ProgressViewIOS />;
        else
            return <ProgressBarAndroid
                    styleAttr="Horizontal" />;
    }

}
